package org.flatshare.dao;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.flatshare.entity.Roomer;

@Stateless
public class RoomerDao {
	
	@PersistenceContext(unitName = "flatunit")
	EntityManager em;
	
	public RoomerDao(){
		
	}
	
	public void createRoomer(Roomer rom){
		
		
		 em.persist(rom);
	}
	public Roomer findRoomer(Integer id){
		
		return em.find(Roomer.class, id);
	}
	public void removeRoomer(Roomer rom){
		em.remove(rom);
	}	

}
